this.notificationStackWidget = new St.Widget({ layout_manager: new Clutter.BinLayout() });
- this._closeButton = makeCloseButton();
- this._closeButton.connect('clicked', Lang.bind(this, function() {
- source.destroy();
- source.emit('done-displaying-content');
- }));
-
this.notificationStackView = new St.ScrollView({ style_class: source.isChat ? '' : 'summary-notification-stack-scrollview',
vscrollbar_policy: source.isChat ? Gtk.PolicyType.NEVER : Gtk.PolicyType.AUTOMATIC,
hscrollbar_policy: Gtk.PolicyType.NEVER });
vertical: true });
this.notificationStackView.add_actor(this.notificationStack);
this.notificationStackWidget.add_actor(this.notificationStackView);
- this.notificationStackWidget.add_actor(this._closeButton);
+
+ this.closeButton = makeCloseButton();
+ this.closeButton.connect('clicked', Lang.bind(this, function() {
+ source.destroy();
+ source.emit('done-displaying-content');
+ }));
+ this.notificationStackWidget.add_actor(this.closeButton);
this._stackedNotifications = [];
this._oldMaxScrollAdjustment = 0;
global.focus_manager.add_group(this.rightClickMenu);
},
- get closeButtonVisible() {
- return this._closeButton.visible;
- },
-
- set closeButtonVisible(v) {
- this._closeButton.visible = v;
- },
-
_onKeyPress: function(actor, event) {
if (event.get_key_symbol() == Clutter.KEY_Up) {
actor.emit('clicked', 1);
this._notificationQueue = newQueue;
this._summaryBoxPointer.bin.child = this._summaryBoxPointerItem.notificationStackWidget;
- this._summaryBoxPointerItem.closeButtonVisible = true;
+
+ let closeButton = this._summaryBoxPointerItem.closeButton;
+ closeButton.show();
this._summaryBoxPointerItem.prepareNotificationStackForShowing();
} else if (this._clickedSummaryItemMouseButton == 3) {
this._summaryBoxPointer.bin.child = this._clickedSummaryItem.rightClickMenu;
if (obj.resident) {
this._residentNotificationBox.add(item.notificationStackWidget);
- item.closeButtonVisible = false;
+ item.closeButton.hide();
item.prepareNotificationStackForShowing();
} else {
[obj.sourceBox, obj.countLabel] = this._makeNotificationSource(item.source);
obj.resident = true;
this._residentNotificationBox.add(obj.item.notificationStackWidget);
- obj.item.closeButtonVisible = false;
+ obj.item.closeButton.hide();
obj.item.prepareNotificationStackForShowing();
} else {
// just update the counter